package com.example.model;

import java.util.Date;

/**
 * Created by Administrator on 2019/7/8.
 */
public class MachineModel {

    private String account;

    private Long id;

    private String imei;

    private Integer productType;

    private String productTypeName;

    private Integer status;

    private Integer userStatus;

    private Date activationTime;

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getImei() {
        return imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public Integer getProductType() {
        return productType;
    }

    public void setProductType(Integer productType) {
        this.productType = productType;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
    }

    public Date getActivationTime() {
        return activationTime;
    }

    public void setActivationTime(Date activationTime) {
        this.activationTime = activationTime;
    }

    public String getProductTypeName() {
        return productTypeName;
    }

    public void setProductTypeName(String productTypeName) {
        this.productTypeName = productTypeName;
    }

    public String getStrStatus(){
        if (getStatus() == null) {
            return "";
        }
        switch (getStatus()) {
            case 1:
                return "新建";
            case 2:
                return "已售";
            case 3:
                return "已激活";
            case 4:
                return "冻结";
            case 5:
                return "维修";
            case 6:
                return "报废";
            case 7:
                return "移除";
            case 8:
                return "返厂换货";
            case 9:
                return "返厂换imei";
            case 10:
                return "工厂回收";
            case 11:
                return "退货";

            default:
                return "";
        }
    }

    public String getStrUserStatus(){
        if (getUserStatus() == null) {
            return "";
        }
        switch (getUserStatus()) {
            case 1:
                return "启用";
            case 2:
                return "停用";
            default:
                return "";
        }
    }

    public MachineModel() {
    }

    public MachineModel(String account, Long id, String imei, Integer productType, String productTypeName, Integer status, Integer userStatus, Date activationTime) {
        super();
        this.account = account;
        this.id = id;
        this.imei = imei;
        this.productType = productType;
        this.productTypeName = productTypeName;
        this.status = status;
        this.userStatus = userStatus;
        this.activationTime = activationTime;
    }
}
